package Counter;

public class DiscreteHistogram extends Histogram {

	public DiscreteHistogram(double ub, double lb, int numIntervals,
			String observedVariable) {
		super(ub, lb, numIntervals, observedVariable);
		this.setType(valueType.contineous);
	}

	// Increases the corresponding bin
	public void count(double x) {
		if (x < lowerBound) {
			incrementBin(0);
			return;
		}

		if (x >= upperBound) {
			incrementBin(bins.size() - 1);
			return;
		}
		incrementBin(calcBin(x));
	}

}
